package com.hmdp.service.impl;

import com.hmdp.dto.Result;
import com.hmdp.entity.UserInfo;
import com.hmdp.mapper.UserInfoMapper;
import com.hmdp.service.IUserInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 */
@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements IUserInfoService {

    @Override
    public Result updateInfo(UserInfo userInfo) {

        boolean ok = updateById(userInfo);
        if(ok){
            return Result.ok("更新成功");
        }
        else return Result.fail("未知错误");
    }
}
